<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="/WEB-INF/jsp/com/include/declare.jspf" %>
<%@ include file="/WEB-INF/jsp/com/include/doctype.jspf" %>
<script type="text/javascript" src="/kr/common/js/pie/pie_ready.js"></script>
<script type="text/javascript" src="<c:url value='/common/js/jquery-1.7.1.js'/>"></script>
<script type="text/javascript" src="<c:url value='/common/js/jquery-ui-1.8.16.custom.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/common/js/jquery-popup.0.2.js'/>"></script>
<script type="text/javascript" src="<c:url value='/common/js/ajaxupload.js'/>"></script>
<script type="text/javascript" src="<c:url value='/common/js/Common.js'/>"></script>
<script type="text/javascript" src="/kr/common/js/pie/pie_ready.js"></script>
<script>

function PrevNextView(qaSn){

    var qaSn1 = document.getElementById("qaSn");
    
    qaSn1.value = qaSn;
var form = document.qaAswListForm;
form.action = "<c:url value='/mpg/QAAswInfo.do'/>";
form.submit();  
}

function QaListView(){
    var form = document.qaAswListForm;
    form.action = "<c:url value='/mpg/QAListPaging.do'/>";
    form.submit();  
    }
    
function EntBrChg(str){
   
    var encStr = str.replaceAll("\n","</br>");
    return encStr
}    
    
    
</script>

 


</head>
<body>
<%@ include file="/WEB-INF/jsp/com/include/layerpopup.jspf" %>
<div id="wrap" class="non-subnavigation">
    <%@ include file="/WEB-INF/jsp/com/include/navi_utill_sub.jspf" %>
    <%@ include file="/WEB-INF/jsp/com/include/navi_header.jspf" %>
	<hr />

	<%@ include file="/WEB-INF/jsp/com/include/sub_header_global03.jspf" %>
	<hr />

	<div id="container">
		<div id="subtitle-area"><div class="subtitle-area-inner">
			<%@ include file="/WEB-INF/jsp/com/include/location.jspf" %>
		</div></div>
    <form id="qaAswListForm" name="qaAswListForm" onSubmit="return false">
        <input type="hidden" id="totalRow" name="totalRow" value= "<c:out value="${mpgSearchInfoVO.total}"/>">
        <input type="hidden"  id="pageIndex" name="pageIndex" value ="<c:out value="${mpgSearchInfoVO.pageIndex}"/>">
        <input type="hidden" id="mbrSn"  name="mbrSn" value="<c:out value="${mpgSearchInfoVO.mbrSn }"/>" >
        <input type="hidden" id="qaSn" name="qaSn" value="">
    		<div id="article">
			<ul class="mypage-navigation">
                <li><a href="<c:url value="/mpg/summeryList.do"/>"><img src="/kr/images/global_menu/navi_mypage01_out.gif" alt="나의 요약정보" /></a></li>
                <li><a href="<c:url value="/mpg/pwdCheckView.do"/>"><img src="/kr/images/global_menu/navi_mypage02_out.gif" alt="회원 정보" /></a></li>
                <li><a href="<c:url value="/mpg/QuotList.do"/>"><img src="/kr/images/global_menu/navi_mypage03_out.gif" alt="최근 견적" /></a></li>
                <li><a href="<c:url value="/mpg/ctlgListPaging.do"/>"><img src="/kr/images/global_menu/navi_mypage04_out.gif" alt="카탈로그 신청 이력" /></a></li>
                <li><a href="<c:url value="/mpg/tdaListPaging.do"/>"><img src="/kr/images/global_menu/navi_mypage05_out.gif" alt="시승 신청 이력" /></a></li>
                <li><a href="<c:url value="/mpg/mpgEvntInfoView.do"/>"><img src="/kr/images/global_menu/navi_mypage06_out.gif" alt="이벤트 참여 이력" /></a></li>
                <li><a href="<c:url value="/mpg/QAListPaging.do"/>"><img src="/kr/images/global_menu/navi_mypage07_over.gif" alt="Q&amp;A" /></a></li>
			</ul>
			<h4 class="subsection"><img src="/kr/images/title/h4_global_menu03_07.gif" alt="Q&amp;A" /></h4>
			<div class="modify-contents-wrap">
				<h5><img src="/kr/images/title/h5_global_menu03_07.gif" alt="Q&amp;A LIST" /></h5>
				<div class="boardlist-wrap">
					<table summary="번호, 신청내용, 신청일자, 상태">
					<caption>상담신청내역</caption>
					<colgroup>
						<col width="10%" />
						<col width="25%" />
						<col />
						<col width="20%" />
						<col width="15%" />
					</colgroup>
					<thead>
					<tr>
						<th scope="col">NO</th>
						<th scope="col">카테고리</th>
						<th scope="col">제목</th>
						<th scope="col">등록일자</th>
						<th scope="col">상태</th>
					</tr>
					</thead>
					<tbody>
					<tr>
						<td class="center"><c:out value="${mpgQaInfo.qaSn}"/></td>
						<td class="center"><c:out value="${mpgQaInfo.qaCategory}"/></td>
						<td class="center"><a href="#"><c:out value="${mpgQaInfo.titl}"/></a></td>
						<td class="center"><c:out value="${mpgQaInfo.rgstDtm}"/></td>
						<td class="center last"><c:out value="${mpgQaInfo.trtmStNm}"/></td>
					</tr>
					<tr>
						<td colspan="5" class="view-area">
							<div class="view-contents-wrap">
								<div class="view-contents">
                                <jsp:scriptlet>
                                        pageContext.setAttribute("crlf", "\r\n");
                                        pageContext.setAttribute("lf", "\n");
                                        pageContext.setAttribute("cr", "\r");
                                </jsp:scriptlet>  
                                ${fn:replace(mpgQaInfo.sbc , lf, "<br/>")}
                                    <c:if test = "${mpgQaInfo.filSn != 0 }">
									<p class="file">
										<a href="/kr/file/download.do?filSn=${ mpgQaInfo.filSn }"></a>${mpgQaInfo.acttcFileNm }
									</p>
                                    </c:if>
								</div>
              
                                <div class="answer-wrap">
                                    <p class="stats">답변1</p>
                                <jsp:scriptlet>
                                        pageContext.setAttribute("crlf", "\r\n");
                                        pageContext.setAttribute("lf", "\n");
                                        pageContext.setAttribute("cr", "\r");
                                </jsp:scriptlet>  
                                ${fn:replace(resultList[0].sbc , lf, "<br/>")}   
                                     <c:if test = "${resultList[0].filSn != 0 }">
                                    <p class="file">
                                        <a href="/kr/file/download.do?filSn=${resultList[0].filSn }">${resultList[0].acttcFilNm }</a>
                                    </p>
                                    </c:if>
                                                                 
                                </div>                                
                                <div class="answer-wrap">
                                    <p class="stats">답변2</p>
                                <jsp:scriptlet>
                                        pageContext.setAttribute("crlf", "\r\n");
                                        pageContext.setAttribute("lf", "\n");
                                        pageContext.setAttribute("cr", "\r");
                                </jsp:scriptlet>  
                                ${fn:replace(resultList[1].sbc , lf, "<br/>")}                                    
                                     <c:if test = "${resultList[1].filSn != 0 }">
                                    <p class="file">
                                        <a href="/kr/file/download.do?filSn=${resultList[1].filSn }">${resultList[1].acttcFilNm }</a>
                                    </p>
                                    </c:if>
                                </div>                                
 
						</td>
					</tr>
					</tbody>
					</table>
				</div>
				<div class="prev-next-list" >
					<table summary="이전글, 다음글">
					<caption>이전글, 다음글 목록</caption>
					<colgroup>
						<col width="15%" />
						<col />
					</colgroup>
					<tbody>
					<tr>
						<th scope="row">▲ 이전글</th>
                        <c:if test="${ empty prev.titl  }"><td>이전 글이 없습니다.</td></c:if>
                        <c:if test="${ prev.titl !='' }">
                        <td><a href="javaScript:PrevNextView(${prev.qaSn});"><c:out value="${prev.titl}"/></a></td>
                        </c:if>                           
					</tr>
					<tr>
						<th scope="row">▼ 다음글</th>
                         <c:if test="${ empty next.titl  }"><td>다음 글이 없습니다.</td></c:if>
                        <c:if test="${ next.titl !='' }">
                        <td><a href="javaScript:PrevNextView(${next.qaSn });"><c:out value="${next.titl}"/></a></td>
                        </c:if>
                        
                        
					</tr>
					</tbody>
					</table>
				</div>
				<div class="btnwrap">
					<a href="javascript:QaListView();"><img src="/kr/images/common/button/btn_list02.gif" alt="목록" /></a>
				</div>
			</div>
		</div>
        </form>
        </div>
       
	</div>
	<hr />
   <%@ include file="/WEB-INF/jsp/com/include/footer.jspf" %>